home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Source Code / C / Applications / Moscow ML 1.42 / src / compiler / Instruct.sml < prev    next >
Encoding:
Text File  |  1997-08-18  |  1.5 KB  |  51 lines  |  [TEXT/R*ch]

  1. (* The type of the instructions of the abstract machine *)
  2.  
  3. (* 1996.07.05 -- e *)
  4.  
  5. open Config Const Prim;
  6.  
  7. datatype ZamInstruction =
  8.     Kquote of StructConstant
  9.   | Kget_global of QualifiedIdent * int
  10.   | Kset_global of QualifiedIdent * int
  11.   | Kaccess of int
  12.   | Kenvacc of int                  (* new *)
  13.   | Kassign of int                  (* newer *)
  14.   | Kgetfield of int                (* new *)
  15.   | Ksetfield of int                (* new *)
  16.   | Kpush
  17.   | Kpop of int                     (* added arg *)
  18.   | Krestart                        (* new *)
  19.   | Kgrab of int                    (* added arg *)
  20.   | Kapply of int                   (* added arg *)
  21.   | Kappterm of int * int           (* added args and renamed *)
  22.   | Kpush_retaddr of int            (* new *)
  23.   | Kcheck_signals
  24.   | Kreturn of int                  (* added arg *)
  25.   | Kclosure of int * int           (* added arg *)
  26.   | Kclosurerec of int * int        (* new *)
  27.   | Kraise                          (* new *)
  28.   | Kmakeblock of BlockTag * int
  29.   | Kprim of primitive
  30.   | Kpushtrap of int
  31.   | Kpoptrap
  32.   | Klabel of int
  33.   | Kbranch of int
  34.   | Kbranchif of int
  35.   | Kbranchifnot of int
  36.   | Kstrictbranchif of int
  37.   | Kstrictbranchifnot of int
  38.   | Ktest of bool_test * int
  39.   | Kbranchinterval of int * int * int * int
  40.   | Kswitch of int Array.array
  41. ;
  42.  
  43. type ZamPhrase =
  44. {
  45.   kph_funcs:   ZamInstruction list,     (* code for functions *)
  46.   kph_inits:   ZamInstruction list,     (* initialization code *)
  47.   kph_is_pure: bool                     (* pure = no side effects *)
  48. };
  49.  
  50. val Nolabel = ~1;
  51.